package Interview;

import java.text.DecimalFormat;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * Created by loso on 2017/3/18.
 */
public class _360_2017318Test2 {


    public static void main1(String[] args) {
        Scanner input = new Scanner(System.in);
        while(input.hasNext()) {
            int num = input.nextInt();
            int[] boo = new int[num];
            for (int i = 0; i < num; i++) {
                boo[i] = input.nextInt();
            }
            int count = num - 1;
            Set<Integer> set = new HashSet<>();
            for (int i = 0; i < num; i++) {
                if(set.contains(boo[i])){
                    count--;
                    set.clear();
                    set.add(boo[i]);
                }
                else{
                    set.add(boo[i]);
                }
            }
            System.out.println((int)Math.pow(2,count));
        }
    }

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        while(input.hasNext()) {
            int num = input.nextInt();
            int[] boo = new int[num];
            for (int i = 0; i < num; i++) {
                boo[i] = input.nextInt();
            }
            int[] numsss = new int[num];




        }
    }


}
